Optimal. Leaf size=69 \[ \frac{2 \sqrt{x} (A b-a B)}{b^2}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}+\frac{2 B x^{3/2}}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0327636, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {80, 50, 63, 205} \[ \frac{2 \sqrt{x} (A b-a B)}{b^2}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}+\frac{2 B x^{3/2}}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 80
Rule 50
Rule 63
Rule 205
Rubi steps
\begin{align*} \int \frac{\sqrt{x} (A+B x)}{a+b x} \, dx &=\frac{2 B x^{3/2}}{3 b}+\frac{\left (2 \left (\frac{3 A b}{2}-\frac{3 a B}{2}\right )\right ) \int \frac{\sqrt{x}}{a+b x} \, dx}{3 b}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{(a (A b-a B)) \int \frac{1}{\sqrt{x} (a+b x)} \, dx}{b^2}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{(2 a (A b-a B)) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sqrt{x}\right )}{b^2}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.0336418, size = 63, normalized size = 0.91 \[ \frac{2 \sqrt{x} (-3 a B+3 A b+b B x)}{3 b^2}+\frac{2 \sqrt{a} (a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 78, normalized size = 1.1 \begin{align*}{\frac{2\,B}{3\,b}{x}^{{\frac{3}{2}}}}+2\,{\frac{A\sqrt{x}}{b}}-2\,{\frac{Ba\sqrt{x}}{{b}^{2}}}-2\,{\frac{Aa}{b\sqrt{ab}}\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ) }+2\,{\frac{B{a}^{2}}{{b}^{2}\sqrt{ab}}\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.44965, size = 305, normalized size = 4.42 \begin{align*} \left [-\frac{3 \,{\left (B a - A b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x - 2 \, b \sqrt{x} \sqrt{-\frac{a}{b}} - a}{b x + a}\right ) - 2 \,{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}}{3 \, b^{2}}, \frac{2 \,{\left (3 \,{\left (B a - A b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{b \sqrt{x} \sqrt{\frac{a}{b}}}{a}\right ) +{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}\right )}}{3 \, b^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1509, size = 86, normalized size = 1.25 \begin{align*} \frac{2 \,{\left (B a^{2} - A a b\right )} \arctan \left (\frac{b \sqrt{x}}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{2 \,{\left (B b^{2} x^{\frac{3}{2}} - 3 \, B a b \sqrt{x} + 3 \, A b^{2} \sqrt{x}\right )}}{3 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]